<template>
  <vmList
    :apiUrl="byHostToVmList"
    :otherParams="id"
    :isShowBtn="false"
    @findDetail="(record) => $refs.vmDetailRef.open(record)"
  >
    <hostActionOpt />
  </vmList>
  <vmDetail ref="vmDetailRef" />
</template>
<script setup>
import { ref, onMounted, reactive } from "vue";
import { byHostToVmList } from "@/api/hostMgt";
import { useRoute } from "vue-router";
import vmList from "common/vmList/index.vue";
import hostActionOpt from "./vmInfo/hostActionOpt.vue";
import vmDetail from "./vmInfo/vmDetail.vue";

const route = useRoute();
const { id } = route.params;
// const listQuery = reactive({
//   page: 1,
//   limit: 10,
// });
// const tableData = ref([]);
// 获取列表
// const fetchDetailData = async () => {
//   try {
//     const { data } = await byHostToVmList(id,listQuery);
//     tableData.value = data?.items;
//   } catch (err) {
//     console.log(err);
//   }
// };
onMounted(() => {
  // fetchDetailData()
  //  <slot :record="record" />
});
</script>

<style lang="scss" scoped></style>
